//
//  TravelLineOrderEditHeader.m
//  Traveling
//
//  Created by Northwan on 15/6/11.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//

#import "TravelLineOrderEditHeader.h"
@interface TravelLineOrderEditHeader()


@end
@implementation TravelLineOrderEditHeader

+(instancetype)initHeaderView{
    return [[[NSBundle mainBundle]loadNibNamed:@"TravelLineOrderEditHeader" owner:nil options:nil]lastObject];
}

-(void)initData:(HomeItemDetailHeaderModel *)result{
    [self.titleLabel setText:result.title];
    [self.bannerView sd_setImageWithURL:[NSURL URLWithString:result.iconUrl]];
    [self.descLabel setText:result.desc];
    if(result.type == TravelLineDetailType){
        [self.endCityLabel setText:@"去往城市：根据经纬度定位"];
    }else if (result.type == TravelSpecialtyDetailType){
        [self.endCityLabel setText:@"城市：根据经纬度定位"];
    }else{
        [self.endCityLabel setText:[NSString stringWithFormat:@"景点类型：%@",result.level]];
    }
    
    [self.prePriceLabel setText:[NSString stringWithFormat:@"原价格：%.1f",result.prePrice]];
    [self.currentPriceLabel setText:[NSString stringWithFormat:@"优惠价：%.1f",result.currentPrice]];
}

@end
